import {http} from '../../utils/request'

import type {ILoginData, ILoginRes, IUserInfoRes} from './type'
import {IRedeemCodeData, IRedeemCodeRes} from "./type";

/**
 * 登录
 */
export function login(data: ILoginData) {
  return http.post<ILoginRes>('/mdm/brush/machine/login', data,
    {headers: {"Content-Type": "application/x-www-form-urlencoded"}});
}

/**
 * 获取兑换码
 */
export function getRedeemCode(data: IRedeemCodeData) {
  return http.post<IRedeemCodeRes>('/mdm/brush/machine/getRedeemCode', data,
    {headers: {"Content-Type": "application/x-www-form-urlencoded"}});
}
